<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//车类别
Route::prefix('category')->group(function(){
    Route::post('list', 'CarCategoryController@list');
    Route::post('edit', 'CarCategoryController@edit');
    Route::post('update', 'CarCategoryController@update');
    Route::post('store', 'CarCategoryController@store');
    Route::post('delete', 'CarCategoryController@destory');
});
Route::prefix('orc')->group(function(){
    Route::post('driving_info', 'RecognizeDrivingController@driving_info');
    Route::post('dentity_card', 'RecognizeDrivingController@recognizeIdentityCard');
    Route::post('driver_card', 'RecognizeDrivingController@driverLicense');
});
//驾驶证
Route::prefix('driving')->group(function(){
    Route::post('list', 'DrivingController@list');
    Route::post('edit', 'DrivingController@edit');
    Route::post('store', 'DrivingController@store');
    Route::post('update', 'DrivingController@update');
    Route::post('delete', 'DrivingController@destory');
    Route::post('deleteList', 'DrivingController@deleteList');
    Route::post('temp_finish', 'DrivingController@tempFinish');
    Route::post('deleteCarDetail', 'DrivingController@deleteCarDetail');

});
//车辆商业保险
Route::prefix('insurance')->group(function(){
    Route::post('list', 'InsuranceController@list');
    Route::post('edit', 'InsuranceController@edit');
    Route::post('store', 'InsuranceController@store');
    Route::post('update', 'InsuranceController@update');
    Route::post('delete', 'InsuranceController@destory');
});
//车辆交强保险
Route::prefix('tci')->group(function(){
    Route::post('list', 'TciController@list');
    Route::post('edit', 'TciController@edit');
    Route::post('store', 'TciController@store');
    Route::post('update', 'TciController@update');
    Route::post('delete', 'TciController@destory');
});
//车辆保养
Route::prefix('maintenance')->group(function(){
    Route::post('list', 'MaintenanceController@list');
    Route::post('edit', 'MaintenanceController@edit');
    Route::post('store', 'MaintenanceController@store');
    Route::post('store_xuzu', 'MaintenanceController@storeXuzu');
    Route::post('update', 'MaintenanceController@update');
    Route::post('delete', 'MaintenanceController@destory');
});
//车辆年检
Route::prefix('mot')->group(function(){
    Route::post('list', 'MotController@list');
    Route::post('edit', 'MotController@edit');
    Route::post('store', 'MotController@store');
    Route::post('update', 'MotController@update');
    Route::post('delete', 'MotController@destory');
});
//车辆维修
Route::prefix('service')->group(function(){
    Route::post('list', 'ServiceController@list');
    Route::post('edit', 'ServiceController@edit');
    Route::post('store', 'ServiceController@store');
    Route::post('update', 'ServiceController@update');
    Route::post('delete', 'ServiceController@destory');
});
//自己维修
Route::prefix('custome_service')->group(function(){
    Route::post('list', 'CustomServiceController@list');
    Route::post('edit', 'CustomServiceController@edit');
    Route::post('store', 'CustomServiceController@store');
    Route::post('update', 'CustomServiceController@update');
    Route::post('delete', 'CustomServiceController@destory');
});
Route::post('license/search','CarController@search');
//顾客管理
Route::prefix('customer')->middleware('auth:sanctum')->group(function(){
    Route::post('search_customer', 'CustomController@searchCustomer');
    Route::post('list', 'CustomController@list');
    Route::post('edit', 'CustomController@edit');
    Route::post('store', 'CustomController@store');
    Route::post('update', 'CustomController@update');
    Route::post('delete', 'CustomController@destory');
    Route::post('update_amount', 'CustomController@update_amount');
    Route::post('update_hire', 'CustomController@update_hire');
});
//分摊管理
Route::prefix('vehicle_allocation')->group(function(){
    Route::post('list', 'VehicleAllocationController@list');
    Route::post('edit', 'VehicleAllocationController@edit');
    Route::post('store', 'VehicleAllocationController@store');
    Route::post('update', 'VehicleAllocationController@update');
    Route::post('delete', 'VehicleAllocationController@destory');
    Route::post('detail', 'VehicleAllocationController@detail');
});
// 车辆分配比例设置
Route::prefix('car_rate')->group(function(){
    Route::post('list', 'CarCateController@list');
    Route::post('edit', 'CarCateController@edit');
    Route::post('store', 'CarCateController@store');
    Route::post('update', 'CarCateController@update');
    Route::post('delete', 'CarCateController@destory');
});
